#! /bin/bash




total=23;
a=7;
b=13;

for exe in 2d-jacobi-life
do
    rm result/$exe.txt 
    for index in `seq $a $b`;
    do 
    nx=$((2 ** $index))
    t=$((2 ** (total - $a - ($index - $a) * 2)))
    ../$exe/exe-$exe $nx $nx $t >> result/$exe.txt 
    done
done


echo -e "size\tscalar\tauto\tour\tour" > result/$exe.data.txt
cat result/2d-jacobi-life.txt|tr "," "=" | awk -F "= " '{print $3 "\t" $NF}'| paste - - - - |awk '{print $1"\t" $2"\t" $4"\t" $6"\t"$8}' >> result/$exe.data.txt

